package com.whoimi.admin.rest;

import com.whoimi.common.ResultInfo;
import com.whoimi.admin.model.Option;
import com.whoimi.admin.service.DeptService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author whoimi
 * @since 2025-08-01
 **/
@RestController
@RequestMapping("/api/v1/dept")
class DeptRest {

    @Resource
    private DeptService deptService;

    /**
     * 部门列表
     * @param queryParams
     * @return
     */
/*    @GetMapping
    public ResultInfo<List<DeptVO>> getDeptList(
            DeptQuery queryParams
    ) {
        List<DeptVO> list = deptService.getDeptList(queryParams);
        return ResultInfo.ok(list);
    }*/

    /**
     * 部门下拉
     */
    @GetMapping("/options")
    public ResultInfo<List<Option<Long>>> getDeptOptions() {
        List<Option<Long>> list = deptService.listDeptOptions();
        return ResultInfo.ok(list);
    }

}
